package com.mdd.product.validate;

import com.mdd.common.validator.annotation.IDMust;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 商品类别参数
 * @author LikeAdmin
 */
@Data
@ApiModel("商品类别更新参数")
public class ProductTypeUpdateValidate implements Serializable {

    private static final long serialVersionUID = 1L;

    @IDMust(message = "id参数必传且需大于0")
    @ApiModelProperty(value = "编号")
    private Long id;

    @ApiModelProperty(value = "父类型")
    private Long pId;

    @NotNull(message = "name参数缺失")
    @ApiModelProperty(value = "类别名称")
    private String name;
}
